package cn.wolfcode.shop.cloud.service.impl;

import cn.wolfcode.shop.cloud.domain.Good;
import cn.wolfcode.shop.cloud.mapper.GoodMapper;
import cn.wolfcode.shop.cloud.service.IGoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Service
public class GoodServiceImpl implements IGoodService {
    @Autowired
    private GoodMapper goodMapper;

    @Override
    public List<Good> queryByIds(ArrayList<Long> ids) {
        if (ids==null||ids.size()<0){
            return Collections.EMPTY_LIST;
        }

        return goodMapper.queryByIds(ids);
    }
}
